import request from '@/utils/request'



// 查询所有后台资源
export function Resource (params) {
    return request({
        params,
        url: '/resource/listAll'
    })
}

// 添加后台资源
export function createResource (data) {
    return request({
        method: 'post',
        data,
        url: '/resource/create'
    })
}


// 资源修改
export function editResource (id,data) {
    return request({
        method: 'post',
        data,
        url: `/resource/update/${id}`
    })
}


// 资源删除
export function deleteResource (id) {
    return request({
        method: 'post',
        url: `/resource/delete/${id}`
    })
}

// 模糊查询资源
export function resourceSearch (params) {
    return request({
        params,
        url: `/resource/list`
    })
}
